0 JBC
↳1 JBC2FIG (⇒)
↳2 JBCTerminationGraph
↳3 FIGtoITRSProof (⇒)
↳4 AND
↳5 IDP
↳6 IDPtoQDPProof (⇒)
↳7 QDP
↳8 UsableRulesProof (⇔)
↳9 QDP
↳10 QReductionProof (⇔)
↳11 QDP
↳12 QDPSizeChangeProof (⇔)
↳13 YES
↳14 IDP
↳15 IDPNonInfProof (⇒)
↳16 IDP
↳17 IDependencyGraphProof (⇔)
↳18 TRUE
public class AProVERec01 {
public static void main(String[] args){
List a = new List(args[0].length(), null);
rec(args[1].length(), a);
}
public static void rec(int y, List res){
int x = 3 * y;
if(x < 100000){
rec(x+1, res);
}
x = x*2;
res.add(x);
}
}
class List {
int val = 0;
List next = null;
List (int v,List n){
val = v;
next = n;
}
public void add(int newVal){
if (next == null) {
next = new List(newVal, null);
} else {
next.add(newVal);
}
}
}
Generated 12 rules for P and 30 rules for R.
Combined rules. Obtained 1 rules for P and 2 rules for R.
Filtered ground terms:
1213_0_add_FieldAccess(x1, x2, x3, x4) → 1213_0_add_FieldAccess(x2, x3, x4)
List(x1, x2) → List(x2)
1339_0_add_Return(x1) → 1339_0_add_Return
1276_0_add_Return(x1) → 1276_0_add_Return
Filtered duplicate args:
1213_0_add_FieldAccess(x1, x2, x3) → 1213_0_add_FieldAccess(x2, x3)
Filtered unneeded arguments:
1236_1_add_InvokeMethod(x1, x2, x3) → 1236_1_add_InvokeMethod(x1, x2)
Finished conversion. Obtained 1 rules for P and 2 rules for R. System has no predefined symbols.
Generated 15 rules for P and 77 rules for R.
Combined rules. Obtained 1 rules for P and 7 rules for R.
Filtered ground terms:
951_0_rec_Load(x1, x2, x3, x4) → 951_0_rec_Load(x2, x3)
Cond_951_0_rec_Load(x1, x2, x3, x4, x5) → Cond_951_0_rec_Load(x1, x3, x4)
1339_0_add_Return(x1) → 1339_0_add_Return
1276_0_add_Return(x1) → 1276_0_add_Return
List(x1) → List
1216_0_add_NONNULL(x1, x2, x3, x4) → 1216_0_add_NONNULL(x3, x4)
1131_0_rec_Return(x1) → 1131_0_rec_Return
1204_1_rec_InvokeMethod(x1, x2, x3) → 1204_1_rec_InvokeMethod(x1, x3)
Filtered duplicate args:
989_1_rec_InvokeMethod(x1, x2, x3, x4, x5) → 989_1_rec_InvokeMethod(x1, x3, x4, x5)
Filtered unneeded arguments:
989_1_rec_InvokeMethod(x1, x2, x3, x4) → 989_1_rec_InvokeMethod(x1, x2, x4)
1204_1_rec_InvokeMethod(x1, x2) → 1204_1_rec_InvokeMethod(x1)
1236_1_add_InvokeMethod(x1, x2, x3) → 1236_1_add_InvokeMethod(x1, x2)
Combined rules. Obtained 1 rules for P and 7 rules for R.
Finished conversion. Obtained 1 rules for P and 7 rules for R. System has predefined symbols.
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
(0) -> (0), if ((x1[0] →* x1[0]')∧(java.lang.Object(x0[0]) →* java.lang.Object(List(java.lang.Object(x0[0]')))))
1213_0_ADD_FIELDACCESS(x1[0], java.lang.Object(List(java.lang.Object(x0[0])))) → 1213_0_ADD_FIELDACCESS(x1[0], java.lang.Object(x0[0]))
1236_1_add_InvokeMethod(1276_0_add_Return, java.lang.Object(x0)) → 1339_0_add_Return
1236_1_add_InvokeMethod(1339_0_add_Return, java.lang.Object(x0)) → 1339_0_add_Return
1236_1_add_InvokeMethod(1276_0_add_Return, java.lang.Object(x0))
1236_1_add_InvokeMethod(1339_0_add_Return, java.lang.Object(x0))
1213_0_ADD_FIELDACCESS(x1[0], java.lang.Object(List(java.lang.Object(x0[0])))) → 1213_0_ADD_FIELDACCESS(x1[0], java.lang.Object(x0[0]))
1236_1_add_InvokeMethod(1276_0_add_Return, java.lang.Object(x0))
1236_1_add_InvokeMethod(1339_0_add_Return, java.lang.Object(x0))
1236_1_add_InvokeMethod(1276_0_add_Return, java.lang.Object(x0))
1236_1_add_InvokeMethod(1339_0_add_Return, java.lang.Object(x0))
1213_0_ADD_FIELDACCESS(x1[0], java.lang.Object(List(java.lang.Object(x0[0])))) → 1213_0_ADD_FIELDACCESS(x1[0], java.lang.Object(x0[0]))
From the DPs we obtained the following set of size-change graphs:
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Integer, Boolean
(0) -> (1), if ((100000 > 3 * x0[0] && 0 <= 3 * x0[0] →* TRUE)∧(x0[0] →* x0[1])∧(java.lang.Object(x1[0]) →* java.lang.Object(x1[1])))
(1) -> (0), if ((3 * x0[1] + 1 →* x0[0])∧(java.lang.Object(x1[1]) →* java.lang.Object(x1[0])))
(1) (&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0])))=TRUE∧x0[0]=x0[1]∧java.lang.Object(x1[0])=java.lang.Object(x1[1]) ⇒ 951_0_REC_LOAD(x0[0], java.lang.Object(x1[0]))≥NonInfC∧951_0_REC_LOAD(x0[0], java.lang.Object(x1[0]))≥COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))∧(UIncreasing(COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))), ≥))
(2) (>(100000, *(3, x0[0]))=TRUE∧<=(0, *(3, x0[0]))=TRUE ⇒ 951_0_REC_LOAD(x0[0], java.lang.Object(x1[0]))≥NonInfC∧951_0_REC_LOAD(x0[0], java.lang.Object(x1[0]))≥COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))∧(UIncreasing(COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))), ≥))
(3) ([99999] + [-3]x0[0] ≥ 0∧[3]x0[0] ≥ 0 ⇒ (UIncreasing(COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))), ≥)∧[(-1)Bound*bni_32] + [(-1)bni_32]x0[0] ≥ 0∧[(-1)bso_33] ≥ 0)
(4) ([99999] + [-3]x0[0] ≥ 0∧[3]x0[0] ≥ 0 ⇒ (UIncreasing(COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))), ≥)∧[(-1)Bound*bni_32] + [(-1)bni_32]x0[0] ≥ 0∧[(-1)bso_33] ≥ 0)
(5) ([99999] + [-3]x0[0] ≥ 0∧[3]x0[0] ≥ 0 ⇒ (UIncreasing(COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))), ≥)∧[(-1)Bound*bni_32] + [(-1)bni_32]x0[0] ≥ 0∧[(-1)bso_33] ≥ 0)
(6) ([33333] + [-1]x0[0] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))), ≥)∧0 = 0∧[(-1)Bound*bni_32] + [(-1)bni_32]x0[0] ≥ 0∧0 = 0∧[(-1)bso_33] ≥ 0)
(7) (&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0])))=TRUE∧x0[0]=x0[1]∧java.lang.Object(x1[0])=java.lang.Object(x1[1])∧+(*(3, x0[1]), 1)=x0[0]1∧java.lang.Object(x1[1])=java.lang.Object(x1[0]1) ⇒ COND_951_0_REC_LOAD(TRUE, x0[1], java.lang.Object(x1[1]))≥NonInfC∧COND_951_0_REC_LOAD(TRUE, x0[1], java.lang.Object(x1[1]))≥951_0_REC_LOAD(+(*(3, x0[1]), 1), java.lang.Object(x1[1]))∧(UIncreasing(951_0_REC_LOAD(+(*(3, x0[1]), 1), java.lang.Object(x1[1]))), ≥))
(8) (>(100000, *(3, x0[0]))=TRUE∧<=(0, *(3, x0[0]))=TRUE ⇒ COND_951_0_REC_LOAD(TRUE, x0[0], java.lang.Object(x1[0]))≥NonInfC∧COND_951_0_REC_LOAD(TRUE, x0[0], java.lang.Object(x1[0]))≥951_0_REC_LOAD(+(*(3, x0[0]), 1), java.lang.Object(x1[0]))∧(UIncreasing(951_0_REC_LOAD(+(*(3, x0[1]), 1), java.lang.Object(x1[1]))), ≥))
(9) ([99999] + [-3]x0[0] ≥ 0∧[3]x0[0] ≥ 0 ⇒ (UIncreasing(951_0_REC_LOAD(+(*(3, x0[1]), 1), java.lang.Object(x1[1]))), ≥)∧[(-1)Bound*bni_34] + [(-1)bni_34]x0[0] ≥ 0∧[1 + (-1)bso_35] + [2]x0[0] ≥ 0)
(10) ([99999] + [-3]x0[0] ≥ 0∧[3]x0[0] ≥ 0 ⇒ (UIncreasing(951_0_REC_LOAD(+(*(3, x0[1]), 1), java.lang.Object(x1[1]))), ≥)∧[(-1)Bound*bni_34] + [(-1)bni_34]x0[0] ≥ 0∧[1 + (-1)bso_35] + [2]x0[0] ≥ 0)
(11) ([99999] + [-3]x0[0] ≥ 0∧[3]x0[0] ≥ 0 ⇒ (UIncreasing(951_0_REC_LOAD(+(*(3, x0[1]), 1), java.lang.Object(x1[1]))), ≥)∧[(-1)Bound*bni_34] + [(-1)bni_34]x0[0] ≥ 0∧[1 + (-1)bso_35] + [2]x0[0] ≥ 0)
(12) ([33333] + [-1]x0[0] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(951_0_REC_LOAD(+(*(3, x0[1]), 1), java.lang.Object(x1[1]))), ≥)∧0 = 0∧[(-1)Bound*bni_34] + [(-1)bni_34]x0[0] ≥ 0∧0 = 0∧[1 + (-1)bso_35] + [2]x0[0] ≥ 0)
POL(TRUE) = 0
POL(FALSE) = 0
POL(989_1_rec_InvokeMethod(x1, x2, x3)) = [-1] + [-1]x3 + [-1]x2 + [-1]x1
POL(1131_0_rec_Return) = [-1]
POL(java.lang.Object(x1)) = [-1]
POL(1204_1_rec_InvokeMethod(x1)) = [-1] + [-1]x1
POL(1216_0_add_NONNULL(x1, x2)) = [-1] + [-1]x2 + [-1]x1
POL(*(x1, x2)) = x1·x2
POL(2) = [2]
POL(1276_0_add_Return) = [-1]
POL(1339_0_add_Return) = [-1]
POL(NULL) = [-1]
POL(1236_1_add_InvokeMethod(x1, x2)) = [-1] + [-1]x2 + [-1]x1
POL(List) = [-1]
POL(951_0_REC_LOAD(x1, x2)) = [-1] + [-1]x2 + [-1]x1
POL(COND_951_0_REC_LOAD(x1, x2, x3)) = [-1] + [-1]x3 + [-1]x2 + [-1]x1
POL(&&(x1, x2)) = 0
POL(>(x1, x2)) = [-1]
POL(100000) = [100000]
POL(3) = [3]
POL(<=(x1, x2)) = [-1]
POL(0) = 0
POL(+(x1, x2)) = x1 + x2
POL(1) = [1]
COND_951_0_REC_LOAD(TRUE, x0[1], java.lang.Object(x1[1])) → 951_0_REC_LOAD(+(*(3, x0[1]), 1), java.lang.Object(x1[1]))
951_0_REC_LOAD(x0[0], java.lang.Object(x1[0])) → COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))
COND_951_0_REC_LOAD(TRUE, x0[1], java.lang.Object(x1[1])) → 951_0_REC_LOAD(+(*(3, x0[1]), 1), java.lang.Object(x1[1]))
951_0_REC_LOAD(x0[0], java.lang.Object(x1[0])) → COND_951_0_REC_LOAD(&&(>(100000, *(3, x0[0])), <=(0, *(3, x0[0]))), x0[0], java.lang.Object(x1[0]))
TRUE1 → &&(TRUE, TRUE)1
&&(TRUE, FALSE)1 ↔ FALSE1
FALSE1 → &&(FALSE, TRUE)1
FALSE1 → &&(FALSE, FALSE)1
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Integer, Boolean